package com.frogs.ucenter.v1.request;


import javax.servlet.http.HttpServletRequest;

import com.frogs.framework.util.StringUtil;
import com.frogs.framework.web.HttpRequestInfo;
import com.frogs.system.util.ApiUrlParamEnum;
import com.frogs.system.web.api.request.Request;
import com.frogs.system.web.exception.RequestIllegalException;


/**
 * 用户订单删除请求参数类
 *
 * @author jzkangta
 */
public class UserOrderLogDelRequest extends Request {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3033099115641853372L;

	 private Integer userId = 0;//蛙鸣用户id
	 private String partnerOrderSn;
	
	 private String remark;
	 
	 private String partnerUserId="";//合作方userId
	 private String partnerId = "";//合作方Id
	 
	
	public UserOrderLogDelRequest() {
		
	}
	
	@Override
	public void parse(HttpServletRequest request) {
		HttpRequestInfo requestInfo = new HttpRequestInfo(request);
		this.userId = requestInfo.getIntParameter(ApiUrlParamEnum.userId.getParamName(), 0);
		this.partnerId = requestInfo.getParameter(ApiUrlParamEnum.partnerId.getParamName(), "");
		this.partnerOrderSn = requestInfo.getParameter(ApiUrlParamEnum.partnerOrderSn.getParamName(), "");
		this.partnerUserId = requestInfo.getParameter(ApiUrlParamEnum.partnerUserId.getParamName(), "");
		this.remark = requestInfo.getParameter(ApiUrlParamEnum.remark.getParamName(), "");
		if(StringUtil.isEmpty(partnerOrderSn)){
			throw new RequestIllegalException("error partnerOrderSn:" + partnerOrderSn);
		}
		if(StringUtil.isEmpty(partnerUserId)){
			throw new RequestIllegalException("error partnerUserId:" + partnerUserId);
		}
		
		if(StringUtil.isEmpty(partnerId) ) {
			throw new RequestIllegalException("传递错误的参数，请确认合作方ID不能为空!");
		}
		
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getPartnerOrderSn() {
		return partnerOrderSn;
	}

	public void setPartnerOrderSn(String partnerOrderSn) {
		this.partnerOrderSn = partnerOrderSn;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getPartnerUserId() {
		return partnerUserId;
	}

	public void setPartnerUserId(String partnerUserId) {
		this.partnerUserId = partnerUserId;
	}

	public String getPartnerId() {
		return partnerId;
	}

	public void setPartnerId(String partnerId) {
		this.partnerId = partnerId;
	}

	

	
	
}
